/**
 * @author nttdocomo
 */
(function() {
	$LAB.script("/js/sea.js", "/js/jquery.js", "/js/underscore.js").wait().script("/js/backbone.js", "/js/aries.js").wait(function() {
		seajs.config({
			alias : {
				'jquery' : 'jquery',
				'backbone' : 'backbone',
				'underscore' : 'underscore',
				'aries' : 'aries'
			},
			base : 'http://ui.example.com/js/',
			charset : 'utf-8'
		});
		var $body = $("#main");
		seajs.use("../../js/form/field/text.js", function() {
			var text = new aries.form.field.Text({
				renderTo : $body,
				name : 'textfield1',
				fieldLabel : 'mail',
				value : 'Text field value',
				vtype : 'email',
				allowBlank:false
			});
			console.log(text)
		})
		seajs.use("../../js/form/field/checkbox.js", function() {
			var checkbox = new aries.form.field.Checkbox({
				renderTo : $body,
				checked:true,
				name : 'checkbox1',
				fieldLabel : 'Checkbox',
				boxLabel : 'box label'
			});
			//console.log(checkbox.getSubmitValue())
		})/*
		seajs.use("../../js/button/button.js", function() {
			var button = new aries.button.Button({
				text : 'Click me',
				renderTo : $body,
				handler : function() {
					alert('You clicked the button!');
				}
			});
		})*/
	})
})()